package com.igeek.util;

/**
 * 系统枚举类，描述了系统中，所有业务逻辑返回结果
 * 规定不同的返回结果的表述
 */
public enum SystemEnum {

    //声明所有的情况
    SUCCESS(0,"操作成功！"),
    ERROR_INPUT(1,"输入有误！"),
    ERROR_BALANCE(2,"余额不足"),
    ERROR_REPEAT(3,"数据重复");

    private int code;

    private String msg;

    SystemEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
